import type { ProColumns } from '@ant-design/pro-table';
import type { ColumnsType } from 'antd/es/table';
// 表格每行数据类型
export type DataType = {
  username: string;
  userId: string;
  orgId: string;
};
export type columnsDataType = {};
const columnsData: ProColumns<columnsDataType>[] = [
  // 配置搜索框
  {
    title: '名称',
    dataIndex: 'name',
    hideInTable: true,
  },
  {
    title: 'ID',
    dataIndex: 'id',
    hideInTable: true,
  },
  // 表头
  {
    title: 'ID',
    dataIndex: 'id',
    hideInSearch: true,
    width: 200,
  },
  {
    title: '名称',
    dataIndex: 'name',
    hideInSearch: true,
    width: 120,
  },
  {
    title: '任务归属',
    dataIndex: 'owner',
    hideInSearch: true,
    width: 120,
  },
  {
    title: '任务执行人',
    dataIndex: 'assignee',
    hideInSearch: true,
    width: 120,
  },
  {
    title: '关联表单',
    dataIndex: 'formKey',
    hideInSearch: true,
    width: 120,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    hideInSearch: true,
    width: 160,
  },
  {
    title: '操作',
    dataIndex: 'action',
    hideInSearch: true,
    fixed: 'right',
    width: 130,
  },
];

export const usrColumns: ColumnsType<DataType> = [
  {
    title: '姓名',
    dataIndex: 'username',
  },
  {
    title: '所属机构',
    dataIndex: 'orgName',
  },
  {
    title: 'ID',
    dataIndex: 'userId',
  },
];

export default columnsData;
